package com.senseuni.da.utils

import android.content.Context
import android.net.ConnectivityManager

object NetUtil {

    fun isNetConnected(context: Context) : Boolean {
        val connectionManager = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
        val networkInfo = connectionManager.activeNetworkInfo
        networkInfo?.let {
            return it.isConnected
        }
        return false
    }

}